import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
//列表数据
export const columns: BasicColumn[] = [
  /*
  {
    title: '导入月份',
    align:"center",
    dataIndex: 'create_month'
   },
   */
   {
    title: '班级',
    align:"center",
    dataIndex: 'deptName'
   },
   {
    title: '学期',
    align:"center",
    dataIndex: 'semesterName'
   },
   {
    title: '学生',
    align:"center",
    dataIndex: 'name'
   },
   {
    title: '学号',
    align:"center",
    dataIndex: 'code'
   },
   {
    title: '周一',
    align:"center",
    slots: { customRender: 'rowItem1' }
   },
   {
    title: '周二',
    align:"center",
    slots: { customRender: 'rowItem2' }
   },
   {
    title: '周三',
    align:"center",
    slots: { customRender: 'rowItem3' }
   },
   {
    title: '周四',
    align:"center",
    slots: { customRender: 'rowItem4' }
   },
   {
    title: '周五',
    align:"center",
    slots: { customRender: 'rowItem5' }
   },
   {
    title: '周六',
    align:"center",
    slots: { customRender: 'rowItem6' }
   },
   {
    title: '周日',
    align:"center",
    slots: { customRender: 'rowItem7' }
   }
];
//查询数据
export const searchFormSchema: FormSchema[] = [
  {
    label: '部门',
    field: 'departmentId',
    component: 'JSelectDept',
    componentProps:{
      // checkStrictly:true,
      field:'deptId',
      multiple:false,
      params:{
        businessCode:1002
      }
    }
  },
  {
    label: "学期",
    field: 'semesterId',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode:"cs_semester where del_flag=0 and status=1 order by id desc,name,id"
    },
    //colProps: {span: 6},
  },
	{
      label: "学生",
      field: 'personName',
      component: 'Input',
      //colProps: {span: 6},
 	},
   {
    label: "学号",
    field: 'personCode',
    component: 'Input',
    //colProps: {span: 6},
 },
 /*
 {
  label: "导入日期",
  field: "createTime",
  component: 'RangePicker',
  componentProps: {
      valueType: 'Date',
      showTime:true
  },
  //colProps: {span: 6},
}
  */
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '学生',
    field: 'personId',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"ss_person,name,id"
     },
  },
  {
    label: '科目',
    field: 'courseId',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"cs_courses,name,id"
     },
  },
  {
    label: '上课日',
    field: 'weekDays',
    component: 'Input',
  },
  {
    label: '来源',
    field: 'isOnline',
    component: 'Input',
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];

/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}